package com.earthea.application.common.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * 表格分页数据对象
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@ToString
public class TableDataInfo<T> extends BaseResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 总记录数
     */
    private long total;

    /**
     * 列表数据
     */
    private List<T> rows;

    public static final TableDataInfo EMPTY = new TableDataInfo(0, Collections.emptyList());
}
